import os
from vedio_to_images import video_to_images
from images_find_patrick import del_noused_file
from images_crop import crop_all_images
from images_add_text import add_text_to_images
from images_merge import mearge_all_images

if __name__ == '__main__':
    # video_path = '/Users/aolic/Desktop/海绵宝宝第01季/'
    # files_name = os.listdir(video_path)
    # file = 'S01-16情人节快乐+一张小纸片.mp4'
    # file_index = 0
    # video_to_images(path=video_path + file, fps_step=12, file_index=file_index)    # 视频抽帧
    # image_count = len(os.listdir('./images/'))
    # file_index = image_count
    # del_noused_file()   # 删除所有非派大星图片
    # crop_all_images()   # 裁剪所有图片为 900px*600px
    # os.rename('images', file.replace('.mp4', ''))

    add_text_to_images()    # 为全部图像添加文案
    mearge_all_images() # 两两合并全部图像